import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';

class DynamicModel with ChangeNotifier {
  DynamicModel._privateConstructor();
  // 单例的一种实现
  static final DynamicModel sharedDynamicModel =
      DynamicModel._privateConstructor();

  int _count = 0;

  int get count => _count;

  void increment() {
    _count++;
    notifyListeners();
  }
}
